]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Fix invalid function signature and a memory leak
authorColin Walters <walters@verbum.org>
Fri, 26 Jun 2009 21:12:55 +0000 (17:12 -0400)
committerColin Walters <walters@verbum.org>
Tue, 30 Jun 2009 20:42:00 +0000 (16:42 -0400)
Add the missing GParamSpec to on_n_workspaces_changed.

Also, we don't need to re-dup the appid, since it's already dup'd.

src/shell-app-monitor.c

index 99d118bf729b618861749bb9a942cb26eb101415..6edf824dc5ab75739a8d90cce4293473f334b0d1 100644 (file)
@@ -308,7 +308,7 @@ track_window (ShellAppMonitor *self,
   if (!appid)
     return;
 
-  g_hash_table_insert (self->window_to_appid, window, g_strdup (appid));
+  g_hash_table_insert (self->window_to_appid, window, appid);
 
   window_count = GPOINTER_TO_UINT (g_hash_table_lookup (self->running_appids, appid));
 
@@ -386,6 +386,7 @@ shell_app_monitor_get_window_count (ShellAppMonitor *self,
 
 static void
 shell_app_monitor_on_n_workspaces_changed (MetaScreen    *screen,
+                                           GParamSpec    *pspec,
                                            gpointer       user_data)
 {
   ShellAppMonitor *self = SHELL_APP_MONITOR (user_data);
@@ -423,7 +424,7 @@ init_window_monitoring (ShellAppMonitor *self)
   g_signal_connect (screen, "notify::n-workspaces",
                     G_CALLBACK (shell_app_monitor_on_n_workspaces_changed), self);
 
-  shell_app_monitor_on_n_workspaces_changed (screen, self);
+  shell_app_monitor_on_n_workspaces_changed (screen, NULL, self);
 }
 
 static void